/*
 * @Author: shenya
 * @Date: 2023-09-06 17:23:35
 * @Description: 规则管理option
 */
export const tableOption = () => {
  return {
    ...window.$crudMixins.tableOptions,
    span: 24,
    viewBtn: true,
    addBtn: false,
    delBtn: false,
    menuWidth: 140,
    column: [
      {
        label: '规则编号',
        prop: 'code',
        addDisplay: false,
        editDisplay: false,
        viewDisplay: false,
      },
      {
        label: '规则名称',
        prop: 'name',
        search: true,
        maxlength: 30,
        rules: [
          {
            required: true,
            message: '请输入规则名称',
            trigger: 'blur',
          },
        ],
      },
      {
        label: '创建时间',
        prop: 'createTime',
        addDisplay: false,
        editDisplay: false,
      },
      {
        hide: true,
        label: '规则内容',
        prop: 'content',
        type: 'ueditor',
        component: 'AvueUeditor',
        span: 24,
        rules: [
          {
            required: true,
            message: '请输入规则内容',
            trigger: 'blur',
          },
        ],
        // propsHttp: {
        //   name: 'hash',
        //   url: 'key',
        // },
        // oss: 'qiniu',
        options: {
          action: '/upstream/qi-niu/upload',
          props: {
            url: 'data',
          },
        },
      },
    ],
  };
};
